@extends('layouts.home')
@section('content')
    @if ($errors->any())
        <div class="alert alert-danger">
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif
    <div class="card">
        <div class="card-header">
            资料修改
        </div>
        <div class="card-block">
            <form action="{{route('password')}}" method="post">
                @csrf
                <div class="form-group">
                    <label for="exampleInputEmail1">昵称</label>
                    <input type="text" name="username" class="form-control" id="exampleInputEmail1" value="{{Auth::user()->username}}" placeholder="Enter email">
                </div>
                <div class="form-group">
                    <label for="exampleInputPassword1">旧密码</label>
                    <input type="password" name="oldpassword" class="form-control" id="exampleInputPassword1" placeholder="Password">
                </div>
                <div class="form-group">
                    <label for="exampleInputPassword1">新密码</label>
                    <input type="password" name="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
                </div>
                <div class="form-group">
                    <label for="exampleInputPassword1">确认密码</label>
                    <input type="password" name="password_confirmation" class="form-control" id="exampleInputPassword1" placeholder="Password">
                </div>
                <button type="submit" class="btn btn-primary">Submit</button>
            </form>

        </div>
    </div>
@endsection